package com.hualude.roadsign.repository;

import com.hualude.roadsign.dto.DTRequestDto;
import com.hualude.roadsign.dto.HistoryDto;
import com.hualude.roadsign.model.HistoryEntity;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

/**
 * Created by xu-jiaHui on 2017/6/8.
 */
public interface HistoryRepository extends CrudRepository<HistoryEntity, Long> {

    /**
     * @Description: 通过equipmentId获取事件历史4DT
     * @Author: xu-jiaHui
     * @Date: 2017/6/8 22:24
     */
    public List<HistoryDto> getHistory4DT(DTRequestDto dtRequestDto,
                                          Integer equipmentId,
                                          Integer equipmentType) throws Exception;

    public Integer getHistoryCount(Integer equipmentId,
                                   Integer equipmentType,
                                   String search) throws Exception;

    /**
     * @Description: 通过equipmentId获取事件历史4APP
     * @Author: shao-yikun
     * @Date: 2017/6/10 上午9:30
     */
    public List<HistoryDto> getHistory4APP(Integer equipmentId,
                                           Integer equipmentType,
                                           Integer mCount,
                                           Integer mSize) throws Exception;

}
